# -*- coding: utf-8 -*-
# @Time    : 2020/4/7 9:18
# @Author  : Weymouth
# @Email   : 261229090@qq.com
# @File    : 类成员的属性.py
# @Software: PyCharm
# ---------------------------------------------------

class Foo:
    def __init__(self):
        self.name = 'a'

    def bar(self):
        #self是对象
        print('bar')
    #用于执行obj.per
    @property
    def perr(self):
        return 1

    @perr.setter
    def perr(self, val):
        print(val)

    @perr.deleter
    def perr(self):
        print(666)

obj = Foo()
r = obj.perr
print(r)
#
# obj.perr = 123